package com.rocbrid.exception;

import lombok.Data;

/**
 * 业务异常
 */
@Data
public class BizException extends RuntimeException{
    //业务异常
    private Integer code;
    //异常信息
    private String msg;

    public BizException(Integer code,String msg){
        super(msg);
        this.code=code;
        this.msg=msg;
    }

    public BizException(BizExceptionEnum e){
        super(e.getMsg());
        this.code=e.getCode();
        this.msg=e.getMsg();
    }


}
